/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.quality4spl.fm.cvm.impl;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

import org.quality4spl.fm.cvm.ConfigDecision;
import org.quality4spl.fm.cvm.CvmPackage;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Config Decision</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.quality4spl.fm.cvm.impl.ConfigDecisionImpl#getInclusionCriterion <em>Inclusion Criterion</em>}</li>
 *   <li>{@link org.quality4spl.fm.cvm.impl.ConfigDecisionImpl#getIncludedFeatures <em>Included Features</em>}</li>
 *   <li>{@link org.quality4spl.fm.cvm.impl.ConfigDecisionImpl#getExcludedFeatures <em>Excluded Features</em>}</li>
 *   <li>{@link org.quality4spl.fm.cvm.impl.ConfigDecisionImpl#getPersonInCharge <em>Person In Charge</em>}</li>
 *   <li>{@link org.quality4spl.fm.cvm.impl.ConfigDecisionImpl#getRationale <em>Rationale</em>}</li>
 *   <li>{@link org.quality4spl.fm.cvm.impl.ConfigDecisionImpl#isEquivalence <em>Equivalence</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class ConfigDecisionImpl extends ConfigDecisionModelEntryImpl implements ConfigDecision {
	/**
	 * The default value of the '{@link #getInclusionCriterion() <em>Inclusion Criterion</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getInclusionCriterion()
	 * @generated
	 * @ordered
	 */
	protected static final String INCLUSION_CRITERION_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getInclusionCriterion() <em>Inclusion Criterion</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getInclusionCriterion()
	 * @generated
	 * @ordered
	 */
	protected String inclusionCriterion = INCLUSION_CRITERION_EDEFAULT;

	/**
	 * The default value of the '{@link #getIncludedFeatures() <em>Included Features</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getIncludedFeatures()
	 * @generated
	 * @ordered
	 */
	protected static final String INCLUDED_FEATURES_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getIncludedFeatures() <em>Included Features</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getIncludedFeatures()
	 * @generated
	 * @ordered
	 */
	protected String includedFeatures = INCLUDED_FEATURES_EDEFAULT;

	/**
	 * The default value of the '{@link #getExcludedFeatures() <em>Excluded Features</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExcludedFeatures()
	 * @generated
	 * @ordered
	 */
	protected static final String EXCLUDED_FEATURES_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getExcludedFeatures() <em>Excluded Features</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExcludedFeatures()
	 * @generated
	 * @ordered
	 */
	protected String excludedFeatures = EXCLUDED_FEATURES_EDEFAULT;

	/**
	 * The default value of the '{@link #getPersonInCharge() <em>Person In Charge</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPersonInCharge()
	 * @generated
	 * @ordered
	 */
	protected static final String PERSON_IN_CHARGE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getPersonInCharge() <em>Person In Charge</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPersonInCharge()
	 * @generated
	 * @ordered
	 */
	protected String personInCharge = PERSON_IN_CHARGE_EDEFAULT;

	/**
	 * The default value of the '{@link #getRationale() <em>Rationale</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRationale()
	 * @generated
	 * @ordered
	 */
	protected static final String RATIONALE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getRationale() <em>Rationale</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRationale()
	 * @generated
	 * @ordered
	 */
	protected String rationale = RATIONALE_EDEFAULT;

	/**
	 * The default value of the '{@link #isEquivalence() <em>Equivalence</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #isEquivalence()
	 * @generated
	 * @ordered
	 */
	protected static final boolean EQUIVALENCE_EDEFAULT = false;

	/**
	 * The cached value of the '{@link #isEquivalence() <em>Equivalence</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #isEquivalence()
	 * @generated
	 * @ordered
	 */
	protected boolean equivalence = EQUIVALENCE_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected ConfigDecisionImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return CvmPackage.Literals.CONFIG_DECISION;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getInclusionCriterion() {
		return inclusionCriterion;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setInclusionCriterion(String newInclusionCriterion) {
		String oldInclusionCriterion = inclusionCriterion;
		inclusionCriterion = newInclusionCriterion;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, CvmPackage.CONFIG_DECISION__INCLUSION_CRITERION, oldInclusionCriterion, inclusionCriterion));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getIncludedFeatures() {
		return includedFeatures;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setIncludedFeatures(String newIncludedFeatures) {
		String oldIncludedFeatures = includedFeatures;
		includedFeatures = newIncludedFeatures;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, CvmPackage.CONFIG_DECISION__INCLUDED_FEATURES, oldIncludedFeatures, includedFeatures));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getExcludedFeatures() {
		return excludedFeatures;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setExcludedFeatures(String newExcludedFeatures) {
		String oldExcludedFeatures = excludedFeatures;
		excludedFeatures = newExcludedFeatures;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, CvmPackage.CONFIG_DECISION__EXCLUDED_FEATURES, oldExcludedFeatures, excludedFeatures));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getPersonInCharge() {
		return personInCharge;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setPersonInCharge(String newPersonInCharge) {
		String oldPersonInCharge = personInCharge;
		personInCharge = newPersonInCharge;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, CvmPackage.CONFIG_DECISION__PERSON_IN_CHARGE, oldPersonInCharge, personInCharge));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getRationale() {
		return rationale;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setRationale(String newRationale) {
		String oldRationale = rationale;
		rationale = newRationale;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, CvmPackage.CONFIG_DECISION__RATIONALE, oldRationale, rationale));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isEquivalence() {
		return equivalence;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setEquivalence(boolean newEquivalence) {
		boolean oldEquivalence = equivalence;
		equivalence = newEquivalence;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, CvmPackage.CONFIG_DECISION__EQUIVALENCE, oldEquivalence, equivalence));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case CvmPackage.CONFIG_DECISION__INCLUSION_CRITERION:
				return getInclusionCriterion();
			case CvmPackage.CONFIG_DECISION__INCLUDED_FEATURES:
				return getIncludedFeatures();
			case CvmPackage.CONFIG_DECISION__EXCLUDED_FEATURES:
				return getExcludedFeatures();
			case CvmPackage.CONFIG_DECISION__PERSON_IN_CHARGE:
				return getPersonInCharge();
			case CvmPackage.CONFIG_DECISION__RATIONALE:
				return getRationale();
			case CvmPackage.CONFIG_DECISION__EQUIVALENCE:
				return isEquivalence();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case CvmPackage.CONFIG_DECISION__INCLUSION_CRITERION:
				setInclusionCriterion((String)newValue);
				return;
			case CvmPackage.CONFIG_DECISION__INCLUDED_FEATURES:
				setIncludedFeatures((String)newValue);
				return;
			case CvmPackage.CONFIG_DECISION__EXCLUDED_FEATURES:
				setExcludedFeatures((String)newValue);
				return;
			case CvmPackage.CONFIG_DECISION__PERSON_IN_CHARGE:
				setPersonInCharge((String)newValue);
				return;
			case CvmPackage.CONFIG_DECISION__RATIONALE:
				setRationale((String)newValue);
				return;
			case CvmPackage.CONFIG_DECISION__EQUIVALENCE:
				setEquivalence((Boolean)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case CvmPackage.CONFIG_DECISION__INCLUSION_CRITERION:
				setInclusionCriterion(INCLUSION_CRITERION_EDEFAULT);
				return;
			case CvmPackage.CONFIG_DECISION__INCLUDED_FEATURES:
				setIncludedFeatures(INCLUDED_FEATURES_EDEFAULT);
				return;
			case CvmPackage.CONFIG_DECISION__EXCLUDED_FEATURES:
				setExcludedFeatures(EXCLUDED_FEATURES_EDEFAULT);
				return;
			case CvmPackage.CONFIG_DECISION__PERSON_IN_CHARGE:
				setPersonInCharge(PERSON_IN_CHARGE_EDEFAULT);
				return;
			case CvmPackage.CONFIG_DECISION__RATIONALE:
				setRationale(RATIONALE_EDEFAULT);
				return;
			case CvmPackage.CONFIG_DECISION__EQUIVALENCE:
				setEquivalence(EQUIVALENCE_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case CvmPackage.CONFIG_DECISION__INCLUSION_CRITERION:
				return INCLUSION_CRITERION_EDEFAULT == null ? inclusionCriterion != null : !INCLUSION_CRITERION_EDEFAULT.equals(inclusionCriterion);
			case CvmPackage.CONFIG_DECISION__INCLUDED_FEATURES:
				return INCLUDED_FEATURES_EDEFAULT == null ? includedFeatures != null : !INCLUDED_FEATURES_EDEFAULT.equals(includedFeatures);
			case CvmPackage.CONFIG_DECISION__EXCLUDED_FEATURES:
				return EXCLUDED_FEATURES_EDEFAULT == null ? excludedFeatures != null : !EXCLUDED_FEATURES_EDEFAULT.equals(excludedFeatures);
			case CvmPackage.CONFIG_DECISION__PERSON_IN_CHARGE:
				return PERSON_IN_CHARGE_EDEFAULT == null ? personInCharge != null : !PERSON_IN_CHARGE_EDEFAULT.equals(personInCharge);
			case CvmPackage.CONFIG_DECISION__RATIONALE:
				return RATIONALE_EDEFAULT == null ? rationale != null : !RATIONALE_EDEFAULT.equals(rationale);
			case CvmPackage.CONFIG_DECISION__EQUIVALENCE:
				return equivalence != EQUIVALENCE_EDEFAULT;
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (inclusionCriterion: ");
		result.append(inclusionCriterion);
		result.append(", includedFeatures: ");
		result.append(includedFeatures);
		result.append(", excludedFeatures: ");
		result.append(excludedFeatures);
		result.append(", personInCharge: ");
		result.append(personInCharge);
		result.append(", rationale: ");
		result.append(rationale);
		result.append(", equivalence: ");
		result.append(equivalence);
		result.append(')');
		return result.toString();
	}

} //ConfigDecisionImpl
